//
//  SAConstralCell.m
//  SAP
//
//  Created by 中矿科技有限公司 on 17/9/11.
//  Copyright © 2017年 中矿科技有限公司. All rights reserved.
//

#import "SAConstralCell.h"

@implementation SAConstralCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setFromConstractListModel:(SAConstractListModel *)model{
    self.sellerName.text =model.sellerName;
    self.buyerName.text =model.buyerName;
    self.contractCode.text =[NSString stringWithFormat:@"合同编号: %@",model.contractCode];
    self.signDateString.text = [NSString stringWithFormat:@"签订时间: %@",model.signDateString];
    self.contractStatusName.text =model.contractStatusName;
    
//    [self.transferCountBtn setTitle:[NSString stringWithFormat:@"已调拨: %@" ,model.transferCount ] forState:UIControlStateNormal];
    
    NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"已调拨: %@" ,model.transferCount ]];
    NSRange strRange = {0,[str length]};
    [str addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:strRange];
    [self.transferCountBtn setAttributedTitle:str forState:UIControlStateNormal];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
